
ifeq ($(KERNELRELEASE),)
#内核源码的路径, 将KERNELDIR变量追加到 ~/.bashrc 文件了，所以注释掉了下面一行
#KERNELDIR := /home/dengxm2024/linuxProgDir/linuxkerneldir/linux-2.6.35.3
#当前文件夹路径
PWD := $(shell pwd)

EXEC := *.ko

modules:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
install:
	cp $(EXEC) $(IMX28_exe_DIR)
clean:
	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.order *.symvers
	.PHONY: modules modules_install clean
else
	obj-m := hello.o
endif
